window.onload = function(){
    var w = document.documentElement.offsetWidth || document.body.offsetWidth ;
    var odiv = document.getElementById("div1");
    odiv.onmouseover = function(){
        startmove(w-150);
    };
    odiv.onmouseout = function(){
        startmove(w);
    };
    var landbut = document.getElementById("landbut");
    landbut.onclick = function(){
        alert("暂无相关功能哦，不要激动，请耐心等待！");
    };
};
var timer = null;
function startmove(mytarget){
    var odiv = document.getElementById("div1");
    clearInterval(timer);
    timer = setInterval(function(){
        var speed = 0;
        if( odiv.offsetLeft > mytarget)
        {
            speed = -10;
        }
        else
        {
            speed = 10;
        }
        if(odiv.offsetLeft == mytarget){
            clearInterval(timer);
        }
        else{
            odiv.style.left = odiv.offsetLeft+speed+"px";
        }
    },30);
}
function mouseover(){
    var idd = document.getElementById('jsprac');
    idd.style.display = 'block';
}
function mouseout(){
    var idd = document.getElementById('jsprac');
    idd.style.display = 'none';
}